Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 2 - Movie Controller Components / Movie Controller Components Reference
Movie Controller Functions / Managing Controller Attributes


MCPositionController

The MCPositionController function allows you to control the position of a movie and its controller on the computer display.

pascal ComponentResult MCPositionController (MovieController mc,
                                       const Rect *movieRect, 
                                       const Rect *controllerRect,
                                       long someFlags);
mc
Specifies the movie controller for the operation. You obtain this
identifier from the Component Manager's OpenComponent or OpenDefaultComponent function, or from the NewMovieController function (described on page 2-28).
movieRect
Points to a Rect structure that specifies the coordinates of the movie's boundary rectangle. (For details on the Rect structure, see the chapter "Basic QuickDraw" in Inside Macintosh: Imaging.)
controllerRect
Points to a Rect structure that specifies the coordinates of the controller's boundary rectangle. The movie controller component always centers the control portion of the controller inside this rectangle. The movie controller component only uses this parameter when the control portion of the controller is detached from the movie. If you are working with an attached controller, you can set this parameter to nil.
someFlags
If you set these flags to 0, the movie controller component centers the movie in the rectangle specified by movieRect and scales the movie to fit in that rectangle. You may control how the movie is drawn by setting one or more of the following flags to 1:
mcTopLeftMovie
If this flag is set to 1, the movie controller component places the movie into the upper-left corner of the display rectangle specified by the movieRect parameter. The component scales the movie to fit into the rectangle. Note that the control portion of the controller may fall outside of the rectangle, depending upon the results of the scaling operation.
mcScaleMovieToFit
If this flag is set to 1, the movie controller component resizes the movie to fit into the display rectangle specified by the movieRect parameter after it places the control portion of the controller into the rectangle.
If you set this flag and the mcTopLeftMovie flag to 1, the movie controller component resizes the movie to fit into the specified rectangle and places the control portion of the controller outside of the rectangle.
mcPositionDontInvalidate
If this flag is set to 1, the movie controller component is requested not to invalidate areas of the window that are changed as a result of repositioning the movie or the controller. This flag is useful for applications that use the movie controller as part of a larger document. In particular, if the document is scrolled using QuickDraw's ScrollRect routine, optimal redrawing occurs
(that is, scrolled areas are not redrawn) if this flag is set. For details on ScrollRect, see the chapter "Basic QuickDraw" in Inside Macintosh: Imaging.
DESCRIPTION
The MCPositionController function works with controllers that are attached to movies and controllers that are not attached to movies.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help